package com.cib.process.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LoggerHelper {
    private static Logger getLogger(String name){
        return LoggerFactory.getLogger(name);
    }

    private static Logger getLogger(Class currentClass){
        return LoggerFactory.getLogger(currentClass);
    }

    public  static void debug(Class currentClass,String message,Object... args){
        Logger logger = getLogger(currentClass);
        logger.debug(message+"\r\n",args);
    }

    public static void debug(Class currentClass,String message,Throwable t){
        Logger logger = getLogger(currentClass);
        logger.debug(message,t);
    }

    public static void debug(String name,String message,Object... args){
        Logger logger = getLogger(name);
        logger.debug(message+"\r\n",args);
    }

    public static void info(Class currentClass,String message,Object... args){
        Logger logger = getLogger(currentClass);
        logger.info(message+"\r\n",args);
    }

    public static void info(Class currentClass,String message,Throwable t){
        Logger logger = getLogger(currentClass);
        logger.info(message,t);
    }
    public static void info(String name,String message,Object... args){
        Logger logger = getLogger(name);
        logger.info(message+"\r\n",args);
    }

    public static void warn(Class currentClass,String message,Object... args){
        Logger logger = getLogger(currentClass);
        logger.warn(message+"\r\n",args);
    }

    public static void warn(String name,String message,Object... args){
        Logger logger = getLogger(name);
        logger.warn(message+"\r\n",args);
    }

    public static void warn(Class currentClass,String message,Throwable t){
        Logger logger = getLogger(currentClass);
        logger.warn(message,t);
    }

    public static void err(Class currentClass,String message,Object... args){
        Logger logger = getLogger(currentClass);
        logger.error(message+"\r\n",args);
    }

    public static void err(String name,String message,Object... args){
        Logger logger = getLogger(name);
        logger.error(message+"\r\n",args);
    }

    public static void err(Class currentClass,String message,Throwable t){
        Logger logger = getLogger(currentClass);
        logger.error(message,t);
    }

    public static void err(String name,String message,Throwable t){
        Logger logger = getLogger(name);
        logger.error(message,t);
    }


}
